﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZX.TR.Bussiness;
using ZX.TR.Library;

namespace ZX.WebApp.TR
{
    public partial class IndagateCompare : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                DataBinds();
            }
        }
        private void DataBinds()
        {
            BTrSubjectInfo SubjectInfo = new BTrSubjectInfo();
            string id = this.Request.QueryString["id"];
            if (id != "")
            {
                IList<V_IndagateList> list = SubjectInfo.GetIndagateByActivityID(new Guid(id));
                if (list != null)
                {
                    foreach (V_IndagateList iList in list)
                    {
                        if (iList.IndagateType == "B")
                        {
                            this.lblTypeB.Text = "课前调研";
                            this.lblTopicB.Text = iList.IndagateTopic;
                            this.lblContentB.Text = iList.IndagateContent;
                            this.lblANameB.Text = iList.ActivityName;
                            this.lblQNameB.Text = iList.QuestionnaireName;
                            this.lblQaimB.Text = iList.QAim;
                            this.txtPointB.Text = iList.GetPoint.ToString();
                            this.txtResultB.Text = iList.IndagateSumary;
                        }
                        else if (iList.IndagateType == "A")
                        {
                            this.lblType.Text = "课后调研";
                            this.lblTopic.Text = iList.IndagateTopic;
                            this.lblContent.Text = iList.IndagateContent;
                            this.lblAName.Text = iList.ActivityName;
                            this.lblQName.Text = iList.QuestionnaireName;
                            this.lblQaim.Text = iList.QAim;
                            this.txtPoint.Text = iList.GetPoint.ToString();
                            this.txtResult.Text = iList.IndagateSumary;
                        }
                    }
                }
            }
        }
    }
}